class Employee:
    def __init__(self, id, name, code):
        self.name = name
        self.id = id
        self.code = code


LOCK_RECORD = dict()
EMPLOYEES = list()
MAX_ID = 0
CODE_LEN = 6
WORK_TIME = ""
CLOSING_TIME = ""
USERS = dict()

def add(e:Employee):
    """
    将员工对象添加到系统中
    :param e: e (Employee): 需要添加的员工对象
    :return: None
    """
    EMPLOYEES.append(e)

#删除指定ID的员工记录
def remove(id):
    """
    删除指定ID的员工记录
    :param id: 要删除的ID
    :return: None
    """
    for emp in EMPLOYEES:
        if str(id) == str(emp.id):
            EMPLOYEES.remove(emp)
            if emp.name in LOCK_RECORD.keys():
                del LOCK_RECORD[emp.name]
            break

def get_new_id():
    """
    分配ID
    :return: None
    """
    global MAX_ID
    MAX_ID += 1
    return MAX_ID
